﻿using Microsoft.UI.Text;
using Microsoft.UI.Xaml.Data;
using Windows.UI.Text;

namespace DimensionsHelper.Client.WinUi.Helpers;

public partial class FontWeightMultiConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, string language)
    {
        if ((value is FontWeight weight1 && weight1 == FontWeights.Bold) ||
            (parameter is FontWeight weight2 && weight2 == FontWeights.Bold))
        {
            return FontWeights.Bold;
        }

        return FontWeights.Normal;
    }

    public object ConvertBack(object value, Type targetType, object parameter, string language)
    {
        throw new NotSupportedException();
    }
}